-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wasm: add wasmEdge container process to cgroup #87
Conversation
@@ -263,9 +276,7 @@ impl ProcessLifecycle<ExecProcess> for WasmEdgeExecLifecycle { | |||
} | |||
|
|||
async fn delete(&self, _p: &mut ExecProcess) -> containerd_shim::Result<()> { | |||
Err(Error::Unimplemented( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exec in wasm container is still not supported, so should return Err
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
wasm/src/utils.rs
Outdated
@@ -75,3 +76,23 @@ pub fn get_memory_limit(spec: &Spec) -> Option<i64> { | |||
.and_then(|x| x.memory().as_ref()) | |||
.and_then(|x| x.limit()) | |||
} | |||
|
|||
pub(crate) fn get_rootfs(spec: &Spec) -> containerd_shim::Result<String> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to return Option
, let the caller decide how to handle None
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"rootfs is not set in runtime spec".to_string(), | ||
))? | ||
.path(); | ||
mkdir(rootfs, 0o711).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this mkdir removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, will update later
a75f4e6
to
f41467d
Compare
Signed-off-by: Poorunga <2744323@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good job, thank you.
Add wasmEdge container process to cgroup, follow up #74